package com.foreveross.smsh.core.dao;

import java.util.List;
import java.util.Map;

import org.hibernate.SQLQuery;
import org.hibernate.criterion.DetachedCriteria;

import com.foreveross.smsh.common.Paginator;
/**
 * dao基础接口
 * @author zhangle
 * @param <T>
 */
public interface BaseDao<T> {
	
	public T get(String id);
	public List<T> get(String field,Object value);
	
	public void add(T po);
	
	public void update(T po);
	
	public void delete(String id);
	
	public List<T> find(DetachedCriteria criteria);
	
	public void find(Paginator<T> pagin);
	public int executeSQLUpdate(String sql, Map<String,Object> params) ;
	public List executeSQLQuery(String sql, Map<String,Object> params);
	public int executeUpdate(String hql,Object... params);
	public List executeQuery(String hql,Object... params);
	public SQLQuery getSQLQuery(String sql, Map<String,Object> params);
}
